﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ZodiacsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.ZodiacsAdmin" %>
<owc:OwGrid ID="ZodiacsGrid" runat="server" DataSourceID="ZodiacsOds" SkinID="OwGridAdmin">
    <MasterTableView DataSourceID="ZodiacsOds" DataKeyNames="ZodiacID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="ZodiacID" DataType="System.Int64" FilterControlAltText="Filter ZodiacID column"
                HeaderText='<%$OwR:Code %>' SortExpression="ZodiacID" UniqueName="ZodiacID">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$OwR:ThumbImage %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <div align="center">
                        <img src='<%# Eval("ThumbImage") %>' height="100" width="150" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$OwR:InfoLabel %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Language" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Name" />
                            </td>
                            <td>
                                <b><i>
                                    <%# Eval("Name") %></i> </b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="StartDate" />
                            </td>
                            <td>
                                <%# Eval("StartDate")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="EndDate" />
                            </td>
                            <td>
                                <%# Eval("EndDate")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$OwR:CommandLabel %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsDeleted" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%#Eval("IsDeleted")%>'
                                    AutoPostBack="true" Text='<%#Eval("ZodiacID")%>' CssClass="HiddenText" OnCheckedChanged="IsDeletedCb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsEnabled" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsEnabledCb" runat="server" Checked='<%#Eval("IsEnabled")%>'
                                    AutoPostBack="true" Text='<%#Eval("ZodiacID")%>' CssClass="HiddenText" OnCheckedChanged="IsEnabledCb_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <a href='/Admin/Views/Site/ZodiacsEdit.aspx?Id=<%#Eval("ZodiacID")%>'>
                            <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                                id="UpdateImage" /></a>
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("ZodiacsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="ZodiacsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwZodiacsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwZodiacsBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
